<html>
	<head>
		<title>JS Run</title>
		<script src="js/thread.min.js" type="text/javascript"></script>
		<!--[if IE]>
		<script src="js/worker.min.js" type="text/javascript"></script>
		<![endif]-->
		<script type="text/javascript">
				var action = 'wave';

					var event = {
							src:'js/sample.js',
							data:action,
							onsuccess:(function(e) {
								document.getElementById('welcome').innerHTML = e.data;
							}),
							onerror:(function(e) {
								alert(e.message);
							})
						};
					
					(new Thread('Sample Thread')).start(event);
					//var thread = new Thread();
					//thread.run(event);
					//thread.start(event);
					
					//runnable = new Runnable('js/worker_script.js);
					//thread = new Thread(runnable);
					//thread.start();
		</script>
	</head>
	<body>
		<h2>Addition example</h2>
		<div id="welcome"></div>
	</body>
</html>